/**
 * Client.java
 * @author taowei20061122@163.com
 * 2013-6-14 下午3:00:52
 */
package study.designpattern.templatemethod;

import study.designpattern.templatemethod.bean.LoginModel;
import study.designpattern.templatemethod.impl.NormalLogin;
import study.designpattern.templatemethod.impl.WorkerLogin;

/**
 * 客户端测试类
 * @author taowei20061122@163.com
 * 2013-6-14 下午3:00:52
 */
public class Client {


	public static void main(String[] args) {
		//准备登录人员的信息
		LoginModel lm = new LoginModel();
		lm.setLoginId("admin");
		lm.setPwd("workerPwd");
		
		//准备用来进行判断的对象
		LoginTemplate lt = new WorkerLogin();
		LoginTemplate lt2 = new NormalLogin();
		//进行登录测试
		boolean flag = lt.login(lm);
		System.out.println("可以登录工作平台："+flag);
		flag = lt2.login(lm);
		System.out.println("可以进行普通人员登录："+flag);
	}

}
